<%--
  Created by IntelliJ IDEA.
  User: oldliu
  Date: 2021-11-13
  Time: 11:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@page import="cn.school.dao.*,cn.Subject" %>
<%@ page import="java.util.List" %>
<html>
<head>
    <title>课程信息</title>
    <style type="text/css">
        table tr:first-child{
            background-color: darkgray;
        }
        table td{
            text-align: center;
        }
    </style>
</head>
<body>
  <%
      SubjectDao dao=new SubjectDao();
      List<Subject> all = dao.findALL();
  %>
<table align="center" width="80%" border="1" cellspacing="0" cellpadding="0">
    <tr>
        <td>课程号</td><td>课程名称</td><td>学时</td>
    </tr>
    <%
        for(Subject s:all){
    %>
    <tr>
        <td><%=s.getId()%></td><td><%=s.getSubjectname()%></td><td><%=s.getClasshour()%></td>
    </tr>
    <%}%>
</table>
</body>
</html>
